<?php
/**
 * Created by PhpStorm.
 * User: zyj
 * Date: 2019/11/25
 * Time: 15:17
 * title: 钻石充值记录
 */

namespace app\admin\controller;
use app\admin\model\User;
use app\admin\model\GiveRecord as GiveRecordModel;
class GiveRecord extends Index
{

    public function index()
    {
        return view();
    }

    //扣除钻石
    public function check()
    {
        $arr = [23,26,56];
        if( !in_array(session('admin_id'),$arr)){
            return ['code'=>-100,'msg'=>'您没有权限'];
        }
        $givePresenModel = new GiveRecordModel();
        $data = $givePresenModel->getDataList();
        return json($data);
    }

    public function indexData() // GiveRecordIndexData
    {
        $giveRecordModel = new GiveRecordModel();
        $data = $giveRecordModel->getIndexData();
        return json($data);
    }







}